package org.ly2048.com.ly2048.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import org.ly2048.com.ly2048.R;
import org.ly2048.com.ly2048.terisme.TerisMe;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    TextView tv_2048, tv_fk, tv_tcs,tv_wzq,tv_sz;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tv_2048 = (TextView) findViewById(R.id.tv_2048);
        tv_wzq = (TextView) findViewById(R.id.tv_wzq);
        tv_fk = (TextView) findViewById(R.id.tv_fk);
        tv_sz = (TextView) findViewById(R.id.tv_sz);
        tv_tcs = (TextView) findViewById(R.id.tv_tcs);

        tv_2048.setOnClickListener(this);
        tv_wzq.setOnClickListener(this);
        tv_fk.setOnClickListener(this);
        tv_sz.setOnClickListener(this);
        tv_tcs.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.tv_2048:
                Intent intent = new Intent(MainActivity.this, Game2048Activity.class);
                startActivity(intent);
                break;
            case R.id.tv_wzq:
                Intent intent4 = new Intent(MainActivity.this, WuziqiActivity.class);
                startActivity(intent4);
                break;
            case R.id.tv_fk:
                Intent intent2 = new Intent(MainActivity.this, TerisMe.class);
                startActivity(intent2);
                break;
            case R.id.tv_sz:
                Intent intent5 = new Intent(MainActivity.this, UntangleActivity.class);
                startActivity(intent5);
                break;
            case R.id.tv_tcs:
                Intent intent3 = new Intent(MainActivity.this, SnakeActivity.class);
                startActivity(intent3);
                break;
            default:
                break;
        }
    }
}
